﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace cz.muni.fi.pb138.Mock
{
	/// <summary>
	/// a mock object created to generate a few testing media
	/// </summary>
    class MediaCreator
    {
        public static Media CreateSampleMedia()
        {
            return new Media()
            {
                OriginalName = "Prince of Persia: The Sands of Time 2",
                TranslatedName = "Princ z Persie: Písky casu",
                Director = "Mike Newell",
                Genres = new List<string> { "Action", "Adventure", "Fantasy", "Romantic" },
                Content = "A young fugitive prince and princess must stop a villain who unknowingly threatens to destroy the world with a special dagger that enables the magic sand inside to reverse time.",
                Rating = 6.6,
                Cast = new List<String> {"Jake Gyllenhaal" ,"Gemma Arterton" , "Ben Kingsley" },
                Country = "USA",
                Length = 116,
                ReleaseDate = new DateTime(2010, 8, 5)
            };
        }

        public static void InsertSomeMedia()
        {
            List<Media> temp = new List<Media>();
            temp.Add(new Media()
            {
                OriginalName = "The Avengers",
                TranslatedName = "The Avengers",
                Director = "Joss Whedon",
                Genres = new List<string> { "Action", "Adventure", "Sci - Fi" },
                Content = "Nick Fury of S.H.I.E.L.D. brings together a team of super humans to form The Avengers to help save the Earth from Loki and his army.",
                Rating = 8.7,
                Cast = new List<String> { "Robert Downey Jr.", "Chris Evans", "Mark Ruffalo" },
                Country = "USA",
                Length = 143,
                ReleaseDate = new DateTime(2012, 5, 3)
            });
            temp.Add(new Media()
            {
                OriginalName = "Battleship",
                TranslatedName = "Vojnova lod",
                Director = "Peter Berg",
                Genres = new List<string> { "Action", "Sci - Fi", "Thriller"},
                Content = "A fleet of ships is forced to do battle with an armada of unknown origins in order to discover and thwart their destructive goals.",
                Rating = 6.3,
                Cast = new List<String> { "Taylor Kitsch", "Alexander Skarsgård", "Rihanna" },
                Country = "USA",
                Length = 131,
                ReleaseDate = new DateTime(2012, 4, 19)
            });
            temp.Add(new Media()
            {
                OriginalName = "The Hunger Games",
                TranslatedName = "The Hunger Games",
                Director = "Gary Ross",
                Genres = new List<string> { "Action", "Adventure", "Sci - Fi" },
                Content = "Set in a future where the Capitol selects a boy and girl from the twelve districts to fight to the death on live television, Katniss Everdeen volunteers to take her younger sister's place for the latest match.",
                Rating = 7.6,
                Cast = new List<String> { "Stanley Tucci", "Wes Bentley", "Jennifer Lawrence" },
                Country = "USA",
                Length = 142,
                ReleaseDate = new DateTime(2012, 3, 22)
            });


            temp.ForEach(x => MediaManager.Single.CreateMedia(x));
        }
    }
}
